package algorithms.que14;

/**
 * @功能
 * @创建时间 2020/9/14
 */
public class FixedCapacityStackOfInts {
    private int[] a;
    private int N;
    public FixedCapacityStackOfInts(int cap)
    {a=new int[cap];}

    public void push(int item)
    {a[N++]=item;}

    public int pop()
    {return a[--N];}

    public boolean isEmpty()
    {return N==0;}

    public int size()
    {return N;}

    public boolean isFull()
    {return N==a.length;}
}
